package com.example.mk.UI.MiniApp;

import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import com.example.mk.R;
import com.example.mk.UI.Navi.NaviBarView;
import com.example.mk.Utils.StatusBarUtil;

public class MiniAppActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_miniapp);

        //根据状态栏颜色来决定状态栏文字用黑色还是白色
        StatusBarUtil.setStatusBarMode(this, true, R.color.white);
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.hide();
        }

        // 设置标题栏
        NaviBarView naviBarView = findViewById(R.id.navi_bar_mk);
        naviBarView.setTittle("小程序");
        naviBarView.setLeftOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                MiniAppActivity.this.finish();
                overridePendingTransition(R.anim.nav_default_pop_enter_anim, R.anim.nav_default_pop_exit_anim);
            }
        });
    }
}
